﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using QLTV.DAL;
using QLTV.Public;
using System.Data.SqlClient;

namespace QLTV.BLL
{
    public class TheLoaiBLL
    {
        TheLoaiDAL tlDAL = new TheLoaiDAL();
        public DataTable LoadCoTenTheLoai()
        {
            try
            {
                return tlDAL.LoadTL_CoTenTL();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public DataTable TheLoai_LoadDuLieu()
        {
            try
            {
                return tlDAL.TheLoai_LoadTheLoai();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public DataTable TheLoai_GetByLast()
        {
            try
            {
                return tlDAL.TheLoai_GetByLast();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public DataTable TimTheoTen(TheLoaiDTO tlDTO)
        {
            try
            {
                return tlDAL.TimTheoTen(tlDTO);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public int nhapTheLoai(TheLoaiDTO tlDTO)
        {
            return tlDAL.nhapTheLoai(tlDTO);
        }
        public DataTable TheLoai_LoadDuLieuCotMaTL(TheLoaiDTO tlDTO)
        {
            return tlDAL.TheLoai_LoadDuLieuCotMaTL(tlDTO);
        }
        public int TheLoai_Xoa(TheLoaiDTO tlDTO)
        {
            return tlDAL.TheLoai_Xoa(tlDTO);
        }
    }
}
